﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zxb.DayWork.Logic;
using System.Data;
//using Zxb.DayWork.co

namespace Zxb.OneTimeWork
{
    public class HitMigration //: BatchLoopWorker
    {
        //int num;
        //int startid;
        //int currentMaxID = 0;
        //DataTable sourceTable;

        //public HitMigration(int pageCount)
        //{
        //    num = pageCount;
        //    startid = 0;
        //}

        //protected override void ReadData()
        //{
        //    string sql = string.Format("select top {0} id,TYPEID,ObjectID,IP,VisitTime,Source,UrlRefer from HitsWeiKe_Real where ID>{1}", num, startid);
        //    sourceTable = DAL.ReadDt_ReturnNewIfNull(DB.TaskReader, sql);
        //}

        //protected override void ProcessData()
        //{
        //    currentMaxID = sourceTable.AsEnumerable().Select(x => x.Field<int>("id")).Max();
        //    Console.WriteLine(currentMaxID);
        //}

        //protected override void WriteData()
        //{

        //}

        //protected override void InitLoopCondition()
        //{
        //    if (startid < currentMaxID)
        //    {
        //        startid = currentMaxID;
        //    }
        //}
    }
}
